package mz.co.frameworks.loader;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class Workbook {

	private Collection<DataSet> dataSets = new ArrayList<DataSet>();

	private Map<String, DataSet> dataSetMap = new HashMap<String, DataSet>();

	public Collection<DataSet> getDataSets() {
		return dataSets;
	}

	public void addDataSet(DataSet dataSet) {
		this.dataSets.add(dataSet);
		this.dataSetMap.put(dataSet.getCode(), dataSet);
	}

	public DataSet getDataSet(String code) {
		return this.dataSetMap.get(code);
	}

}
